package cn.zxh.improvement.gencode.processor.service;

import cn.zxh.improvement.gencode.processor.BaseCodeGenProcessor;
import cn.zxh.improvement.gencode.spi.CodeGenProcessor;
import com.google.auto.service.AutoService;

import javax.annotation.processing.RoundEnvironment;
import javax.lang.model.element.TypeElement;
import java.lang.annotation.Annotation;

/**
 * ServiceImpl 实现类生成
 *
 * @author zxh
 * @since 2023/5/15 15:06:16
 */
@AutoService(CodeGenProcessor.class)
public class GenServiceImplProcessor extends BaseCodeGenProcessor {

    public static final String SERVICE_SUFFIX = "Service";

    public static final String SERVICE_PREFIX = "I";

    @Override
    protected void generateClass(TypeElement typeElement, RoundEnvironment roundEnvironment) {

    }

    @Override
    public Class<? extends Annotation> getAnnotation() {
        return GenServiceImpl.class;
    }

    @Override
    public String generatePackage(TypeElement typeElement) {
        return typeElement.getAnnotation(GenServiceImpl.class).pkgName();
    }
}
